<template>
    <div>
      {{ userInfo.name }}
      <div>
        {{ userInfo.likes }}
      </div>
      <div>
        <button @click="update">修改</button>
      </div>
    </div>
  </template>
  
  <script lang='ts' setup>
  import { reactive, toRaw, markRaw } from "vue";
  const userInfo = reactive<any>({ name: "张三" });
  userInfo.likes = markRaw(["游泳", "爬山"]);
  const update = () => {
    userInfo.likes[0] = "吃饭";
  };
  </script>
  <style scoped>
  </style>